home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
EnigmA Amiga Run 1996 March
/
EnigmA AMIGA RUN 05 (1996)(G.R. Edizioni)(IT)[!][issue 1996-03][Skylink CD IV].iso
/
earcd
/
comm2
/
mfstlntd.lha
/
telnetd2_0.lha
/
telnetd-2.0
/
source
/
fakesr
/
fakesr.h
< prev
next >
Wrap
C/C++ Source or Header
|
1995-01-15
|
1KB
|
41 lines
/* Unit definitions */
#define FSR_CTLUNIT (-1)
#define FSR_UNITNONE (-1)
#define MAXRESERVEDUNIT 15 /*200*/
/* Generally, if you want to request ownership of a specific arbitrary unit,
pick a number under MAXRESERVEDUNIT. The device will randomly hand out
unused unit positions over MAXRESERVEDUNIT */
struct FSRUnit {
struct Node fsru_Node; /* fakesr private */
ULONG fsru_Num;
ULONG (*fsru_BeginIO)(void *IORequest);
ULONG (*fsru_AbortIO)(void *IORequest);
ULONG (*fsru_Open)(void *IORequest); /* called on unit OpenDevice */
ULONG (*fsru_Close)(void *IORequest); /* called on unit CloseDevice */
void *fsru_UserData[5];
};
/* for FSR_CTLUNIT access, you MUST use a struct IOStdReq */
/* by convention you should use a struct IOExtSer for all
other unit accesses, although it is not required, if the
unit's owner supports other structures */
/* extended commands for FSR_CTLUNIT */
#define FSRCMD_ADDUNIT (CMD_NONSTD+1)
/* for FSRCMD_ADDUNIT set Unit->fsru_Num equal to the desired unit number,
or FSR_UNITNONE if you don't care. set io_Data to a pointer to your
struct FSRUnit. */
#define FSRCMD_REMUNIT (CMD_NONSTD+2)
/* set io_Data to a pointer to the FSRUnit you want to remove */
/* fakesr FSR_CTLUNIT DOES NOT support control commands sent
from interrupt code. Don't try it.
HOWEVER: Individual units may support such accesses */
/* Errors */
#define FSRCTLERR_NONUNIQUE 1 /* possible error return from FSR_CTLUNIT */